﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Dazaza.Framework.Configuration
{
    [XmlRoot("Parameters")]
    public class ParameterConfig
    {
        [XmlElement("Parameter")]
        public List<ParamItem> Parameters { set; get; }
        public ParamItem this[string name]
        {
            get { return Parameters.Find(item => item.Name == name); }
        }
        public ParamItem this[int index]
        {
            get { return Parameters[index]; }
        }
    }


    public class ParamItem
    {
        [XmlAttribute("name")]
        public string Name { set; get; }

        [XmlText]
        public string Text { set; get; }
    }
}
